# -*- coding: utf-8 -*-
"""
Created on Thu Oct  1 10:18:07 2020

@author: dalaska
"""
# game of life
import matplotlib.pyplot as plt
import cv2
import numpy


class world():
    def __init__(size):
        print("size is")
    def set_map(self, a_map):   
        self.map = [[0, 0, 1],[0, 0, 0],[0, 0, 0]]
        print("a world")
    def save():
        print("save")
    # show worldpy
    def show(self):
        
        print(self.map)
    def update(self):
        print("update")
    



if __name__ == '__main__':
    a_map = [[0, 0, 1],[0, 0, 0],[0, 0, 0]]
    wd = world()
    wd.set_map(a_map)
    # plt(a_map)
    b_map = numpy.mat(a_map)
    pimg2 = cv.fromarray(array) 
    
    cv2.imshow(b_map)  
    
    h,w = vis.shape
    vis2 = cv.CreateMat(h, w, cv.CV_32FC3)
    vis2 = cv.CreateMat(b_map)
    
    vis0 = cv.fromarray(vis)
    cv.CvtColor(vis0, vis2, cv.CV_GRAY2BGR)
    
    img = np.zeros((512,512,3), np.uint8)
# Draw a diagonal blue line with thickness of 5 px
cv2.line(img,(0,0),(511,511),(255,0,0),5)

    